﻿using System;
using System.IO;

namespace ExcelConfig.StoreAPI.helpers
{
    internal partial class helper
    {
        public static void ReadAllToMemory(Stream sr, Stream dst)
        {
            var buf = new byte[1024];
            int len = 1;
            while (sr.CanRead && len != 0) if ((len = sr.Read(buf, 0, 1024)) > 0) dst.Write(buf, 0, len);
            dst.Flush();
        }
    }
}
